<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <xiugai></xiugai>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        Vue.component('xiugai',{
            data:() => {
                return {
                    msg:0,
                    // show:''
                    show:'',
                    mes:''
                }
            },
            methods:{
                handle(){
                    this.msg++
                   
                },
                change(){
                    this.mes = this.show
                }
            },
            template:`<div><button @click="handle">点击了{{msg}}次</button><br>
                        输入：<input type="text" v-model="show" @input="change"><br>
                        输出：<span>{{mes}}</span>
                    </div>`
        })
        const ve = new Vue({
            el:'#app'
        })
    </script>
</body>
</html>